package com.cdie.myschool.mapper.StudentCostMapper;

import com.cdie.myschool.domain.dto.StudentCostDTO;
import com.cdie.myschool.domain.entity.Calendar;
import com.cdie.myschool.domain.entity.ECardAccount;
import com.cdie.myschool.domain.entity.ECardTransaction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 雷金臣199000347
 * @date 2022/10/12 - 19:01
 */
@Mapper
public interface StudentCostMapper {
    @Select("select * from calendar where school_year=#{xn} and semester=#{xq}")
    Calendar getCalendar(StudentCostDTO studentCostDTO);

    @Select("select *from e_card_account where user_id=#{studentCode}")
    ECardAccount getECardId(StudentCostDTO studentCostDTO);

    @Select("select * from e_card_transaction where semester_id=#{semesterId} and e_card_id=#{eCardId}")
    List<ECardTransaction> getECTList(int semesterId,String eCardId);
}
